/*    */ package change.org.eclipse.swt.browser.mozilla.core;
/*    */ 
/*    */ import java.io.File;
/*    */ import java.io.FileNotFoundException;
/*    */ import org.mozilla.xpcom.IAppFileLocProvider;
/*    */ 
/*    */ public class LocationProvider
/*    */   implements IAppFileLocProvider
/*    */ {
/*    */   File libXULPath;
/*    */ 
/*    */   public LocationProvider(File aBinPath)
/*    */     throws FileNotFoundException
/*    */   {
/* 27 */     this.libXULPath = aBinPath;
/* 28 */     if ((!(this.libXULPath.exists())) || (!(this.libXULPath.isDirectory())))
/* 29 */       throw new FileNotFoundException("libxul directory specified is not valid: " + this.libXULPath.getAbsolutePath());
/*    */   }
/*    */ 
/*    */   public File getFile(String aProp, boolean[] aPersistent) {
/* 33 */     File file = null;
/* 34 */     if ((aProp.equals("GreD")) || (aProp.equals("GreComsD")))
/*    */     {
/* 36 */       file = this.libXULPath;
/* 37 */       if (aProp.equals("GreComsD")) {
/* 38 */         file = new File(file, "components");
/*    */       }
/*    */     }
/* 41 */     else if ((aProp.equals("MozBinD")) || 
/* 42 */       (aProp.equals("CurProcD")) || 
/* 43 */       (aProp.equals("ComsD")) || 
/* 44 */       (aProp.equals("ProfD")))
/*    */     {
/* 46 */       file = this.libXULPath;
/* 47 */       if (aProp.equals("ComsD")) {
/* 48 */         file = new File(file, "components");
/*    */       }
/*    */ 
/*    */     }
/*    */ 
/* 61 */     return file;
/*    */   }
/*    */ 
/*    */   public File[] getFiles(String aProp) {
/* 65 */     File[] files = (File[])null;
/* 66 */     if (aProp.equals("APluginsDL")) {
/* 67 */       files = new File[1];
/* 68 */       files[0] = new File(this.libXULPath, "plugins");
/*    */     }
/*    */ 
/* 84 */     return files;
/*    */   }
/*    */ }
